package lambda;

import org.junit.Test;

import java.util.function.Supplier;

/**
 * @description: 构造器引用
 * @author: apple
 * @date:  2022/1/3 7:39 下午
 * @version 1.0
 **/
public class ContructorTest {

    @Test
    public void test1(){
        Supplier<String>  su = new Supplier<String>() {
            @Override
            public String get() {
                return "hello";
            }
        };

        Supplier<String>  su2 = () -> "hello";

        Supplier<String>  su3 = String ::new;
    }
}
